
#include <ros/ros.h>
#include "addition_server/addTwoInts.h"


int main(int argc, char** argv) 
{
   ros::init(argc, argv, "addition_client");

   ros::NodeHandle node;

   ros::service::waitForService("/addTwoInts");
   ros::ServiceClient person_client = node.serviceClient<addition_server::addTwoInts>("/addTwoInts");

   //初始化请求数据
   addition_server::addTwoInts srv;
   srv.request.num1 = 1000;
   srv.request.num2 = 20;

   person_client.call(srv);

   ROS_INFO("Sum= : %d", srv.response.sum);
   return 0;
}